<template>
    <page-body >
        <view class="page" >
    <view class="flex benben-position-layout flex flex-wrap align-center AiComment_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between flex-sub AiComment_fd0_0'      >
            <view   class='flex flex-wrap align-center AiComment_fd0_0_c0'      >
        <text class='fu-iconfont2  AiComment_fd0_0_c0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1" >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-stretch justify-center'      >
        <text class='AiComment_fd0_0_c1_c0'  >{{$t('AI点评')}}</text>
</view>
    <view   class='flex flex-wrap align-center justify-end AiComment_fd0_0_c0'      >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout AiComment_flex_1"    >
            <view   class='flex flex-direction flex-wrap align-stretch AiComment_fd1_0'      >
        <text   >{{$t('我的反思')}}</text>
    <view   class='flex flex-direction flex-wrap align-stretch AiComment_fd1_0_c1'      >
        <text class='AiComment_fd1_0_c1_c0'  >{{title1}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{con1}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{title2}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{con2}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{title3}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{con3}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{title4}}</text>
<text class='AiComment_fd1_0_c1_c0'  >{{con4}}</text>
</view>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch AiComment_fd1_0'      >
        <text   >{{$t('AI点评：')}}</text>
    <view   class='flex flex-wrap align-center AiComment_fd1_0_c1'      >
        <text class='AiComment_fd1_0_c1_c0'  >{{aiData.content}}</text>
</view>
</view>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </page-body>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        
        
        data(){
			return {"echo":{"answer":"","comment":"","score":"","comment_status":"","aid":""},"answer":[],"title1":"","con1":"","title2":"","con2":"","title3":"","con3":"","title4":"","con4":"","alid":"","aiData":{"content":""},"aid":"14"};
		},
		computed:{
            
		},
		watch:{},
		onLoad(options){
            let {aid}=options
if (aid !== undefined) this.aid = aid
this.getws70cf80c4c220Func()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //APP接口-查看课后反思
                async getws70cf80c4c220Func(){
                        //请求方法
    //数据验证
    
  let dataecho = await this.$api.get(global.apiUrls.post670cf80c4c220, {
    teaching_id:this.aid
  });
  
  if (dataecho.data.code != 1) {
    this.$message.info(dataecho.data.msg);
    return
  } 
  let infoecho = dataecho.data;
  this.echo = infoecho.data
  
    this.answer = JSON.parse(this.echo.answer)
this.title1=this.answer[0].title1
this.con1=this.answer[0].con1
this.title2=this.answer[1].title2
this.con2=this.answer[1].con2
this.title3=this.answer[2].title3
this.con3=this.answer[2].con3
this.title4=this.answer[3].title4
this.con4=this.answer[3].con4
this.alid = this.echo.aid
                    this.getci70cfad1813bdFunc()
                },
                //APP端-学生AI反思点评
                async getci70cfad1813bdFunc(){
                        uni.showLoading({
title:"AI正在点评..."
})
    //请求方法
    //数据验证
    
  let dataaiData = await this.$api.get(global.apiUrls.post670cfad1813bd, {
    aid:this.echo.aid
  });
  
  if (dataaiData.data.code != 1) {
    this.$message.info(dataaiData.data.msg);
    return
  } 
  let infoaiData = dataaiData.data;
  this.aiData = infoaiData.data
  
    uni.hideLoading();
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:#F8F8F8;background-size: 100% auto;
        }
    .AiComment_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .AiComment_fd0_0_c1_c0{
        font-size:36rpx;font-weight:700;color:#333333;line-height:50rpx;
    }
    .AiComment_fd0_0_c0_c0{
        font-size:36rpx;color:#333;
    }
    .AiComment_fd0_0_c0{
        width:120rpx;
    }
    .AiComment_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;
    }
    .AiComment_flex_1{
        padding:24rpx;
    }
    .AiComment_fd1_0_c1_c0{
        color:rgba(102, 102, 102, 1);font-size:24rpx;line-height:48rpx;
    }
    .AiComment_fd1_0_c1{
        background:#f3f6f8;margin:24rpx 0rpx 0rpx 0rpx;padding:24rpx;background-size:100% auto;border-radius:16rpx;
    }
    .AiComment_fd1_0{
        background:#fff;margin:0rpx 0rpx 24rpx 0rpx;background-size:100% auto;border-radius:24rpx;padding:32rpx 24rpx 32rpx 24rpx;
    }
</style>